package com.buka.blog.service;

import com.buka.blog.dao.BlogDao;
import com.buka.blog.entity.Blog;

import java.util.List;

public class BlogService {

    BlogDao blogDao = new BlogDao();

    public int add(Blog blog){
        return blogDao.add(blog);
    }

    public int delete(Long[] id){
        return blogDao.delete(id);
    }

//    public int update(Blog blog){
//        return blogDao.update(blog);
//    }

//    public Blog selectById(Long id){
//        return blogDao.selectById(id);
//    }

    public List<Blog> list(int pageNum,int pageSize){
        return blogDao.list(pageNum,pageSize);
    }

    /**
     * 查询总记录数
     * @return
     */
    public long totalCount() {
        return blogDao.totalCount();
    }
}
